home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume8 / xmail / patch2.05 < prev    next >
Encoding:
Internet Message Format  |  1990-08-27  |  55.9 KB

  1. Path: uunet!snorkelwacker!usc!wuarchive!decwrl!sun-barr!newstop!sun!parns.nsc.com
  2. From: michael@parns.nsc.com (Michael Wagnitz)
  3. Newsgroups: comp.sources.x
  4. Subject: v08i100: xmail, Patch2, Part05/05
  5. Message-ID: <141433@sun.Eng.Sun.COM>
  6. Date: 28 Aug 90 07:50:38 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 1450
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: michael@parns.nsc.com (Michael Wagnitz)
  12. Posting-number: Volume 8, Issue 100
  13. Archive-name: xmail/patch2.05
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 5 (of 5)."
  22. # Contents:  Patch.02c
  23. # Wrapped by michael@harley on Mon Aug 27 12:47:27 1990
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'Patch.02c' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'Patch.02c'\"
  27. else
  28. echo shar: Extracting \"'Patch.02c'\" \(53806 characters\)
  29. sed "s/^X//" >'Patch.02c' <<'END_OF_FILE'
  30. X  ** create the menu buttons
  31. X  */
  32. X!        bw = above = to_left = NULL;
  33. X!        x = 0;
  34. X!        for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
  35. X!            if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) {
  36. X  /*
  37. X  ** If this 'folder file' is also a directory, mark it with a trailing slash '/'
  38. X  */
  39. X!               s = XtMalloc(path_length + strlen(dp->d_name) + 2);
  40. X!               sprintf(s, "%s/%s", path, dp->d_name);
  41. X!               if ((new_dir = opendir(s)) != NULL) {
  42. X!                  sprintf(tmp, "%s/", dp->d_name);
  43. X!                  XtSetArg(args[4], XtNlabel, tmp);
  44. X!                 } else
  45. X!                  XtSetArg(args[4], XtNlabel, dp->d_name);
  46. X!               XtSetArg(args[5], XtNfromHoriz, to_left);            n = 6;
  47. X!               if (! to_left) XtSetArg(args[n], XtNfromVert, above);    n++;
  48. X!               bw = XtCreateManagedWidget("menubutton",commandWidgetClass,layout,args,n);
  49. X!               if (to_left == NULL) above = bw;
  50. X!               to_left = bw;
  51. X!               if (++x % 3 == 0) {        /* make box three items wide */
  52. X!                  x = 0;
  53. X!                  to_left = NULL;
  54. X!                 }
  55. X  /*
  56. X  ** If this 'folder' is a directory, add a button popup menu of its files.
  57. X  */
  58. X!               if (new_dir) {
  59. X!                  closedir(new_dir);
  60. X!                  sprintf(trans, dir_Trans, tmp, s, depth);
  61. X!                  XtOverrideTranslations(bw, XtParseTranslationTable(trans));
  62. X!                 }
  63. X!               XtFree(s);
  64. X               }
  65. X            }
  66. X+         closedir(dirp);
  67. X         }
  68. X  /*
  69. X  ** If no buttons were created for this menu, destroy the widget.
  70. X  */
  71. X*** ../v1.1/environs.c    Mon Jun  4 09:48:37 1990
  72. X--- environs.c    Mon Aug 27 11:09:19 1990
  73. X***************
  74. X*** 19,25 ****
  75. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  76. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  77. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  78. X!  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  79. X   * PERFORMANCE OF THIS SOFTWARE.
  80. X   *
  81. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  82. X--- 19,25 ----
  83. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  84. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  85. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  86. X!  * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  87. X   * PERFORMANCE OF THIS SOFTWARE.
  88. X   *
  89. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  90. X***************
  91. X*** 28,37 ****
  92. X--- 28,95 ----
  93. X  #include "global.h"
  94. X  
  95. X  extern    char    *mailrcFile();
  96. X+ char        otherBuf[BUFSIZ];
  97. X  
  98. X  AliasRecPtr    *aliases = NULL;    /* array of mail alias strings    */
  99. X  
  100. X+ 
  101. X  /*
  102. X+ ** @(#)addtobuf() - add text to recipient or file and folder names buffer
  103. X+ **            drop any leading backslash from a recipient name
  104. X+ */
  105. X+ void
  106. X+ addtobuf(text, buffer, current_line, otherBuffer)
  107. X+ char    *text;
  108. X+ char    *buffer;
  109. X+ char    *current_line;
  110. X+ char    *otherBuffer;
  111. X+ {
  112. X+  if (! index("./+", *text)) {
  113. X+     if (*buffer) strcat(buffer, ", ");
  114. X+     if (strlen(current_line) + strlen(text) > 71) {
  115. X+        strcat(buffer, "\n\t");
  116. X+        current_line += strlen(current_line);
  117. X+       }
  118. X+     strcat(buffer, (*text == '\\') ? &text[1] : text);
  119. X+    } else {
  120. X+     if (*otherBuffer) strcat(otherBuffer, ", ");
  121. X+        strcat(otherBuffer, text);
  122. X+    }
  123. X+ } /* addtobuf */
  124. X+ 
  125. X+ 
  126. X+ /*
  127. X+ ** @(#) de_alias(text, buffer, current_line, otherBuffer)
  128. X+ */
  129. X+ void
  130. X+ de_alias(text, buffer, current_line, otherBuffer)
  131. X+ char    *text;
  132. X+ char    *buffer;
  133. X+ char    *current_line;
  134. X+ char    *otherBuffer;
  135. X+ {
  136. X+  char    *cp, *list;
  137. X+  int    in_comma;
  138. X+ 
  139. X+ 
  140. X+  if (! index(text, ','))
  141. X+     addtobuf(text, buffer, ¤t_line, otherBuffer);
  142. X+  else {
  143. X+     for (list = text; *list;) {
  144. X+         in_comma = 0;
  145. X+         if (cp = index(list, ',')) {
  146. X+            *cp = '\0';
  147. X+            in_comma = 1;
  148. X+           } else cp = list + strlen(list);
  149. X+         addtobuf(list, buffer, ¤t_line, otherBuffer);
  150. X+         if (in_comma) *cp++ = ',';
  151. X+         list = cp;
  152. X+        }
  153. X+    }
  154. X+ } /* de_alias */
  155. X+ 
  156. X+ 
  157. X+ /*
  158. X  ** @(#)alias() - return alias value(s) from mail, or name if no alias found
  159. X  */
  160. X  char *
  161. X***************
  162. X*** 40,47 ****
  163. X  {
  164. X   static    char    tmp[BUFSIZ];
  165. X   static    char    buf[BUFSIZ];
  166. X!  char        *s, *p, *list, *value, *index();
  167. X   int        i, n;
  168. X   FILE        *fp;
  169. X  
  170. X  
  171. X--- 98,106 ----
  172. X  {
  173. X   static    char    tmp[BUFSIZ];
  174. X   static    char    buf[BUFSIZ];
  175. X!  char        *line, *s, *p, *list, *value;
  176. X   int        i, n;
  177. X+  int        testing_for_compound_address;
  178. X   FILE        *fp;
  179. X  
  180. X  
  181. X***************
  182. X*** 53,59 ****
  183. X  **
  184. X  ** We also provide support for the alias alias group, and the possibility that
  185. X  ** the user has entered multiple names for an alias without comma separation,
  186. X! ** or that mail has handed us a list with wierd comma combinations due to the
  187. X  ** user's attempts to include commas in the list.  Support is also provided
  188. X  ** for processing continuation lines, if we had to read the .mailrc ourselves.
  189. X  */
  190. X--- 112,118 ----
  191. X  **
  192. X  ** We also provide support for the alias alias group, and the possibility that
  193. X  ** the user has entered multiple names for an alias without comma separation,
  194. X! ** or that mail has handed us a list with weird comma combinations due to the
  195. X  ** user's attempts to include commas in the list.  Support is also provided
  196. X  ** for processing continuation lines, if we had to read the .mailrc ourselves.
  197. X  */
  198. X***************
  199. X*** 116,128 ****
  200. X          aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec));
  201. X          for (; *p && (*p == ' ' || *p == '\t'); p++);
  202. X          for (aliases[n]->name = p; *p && *p != ' ' && *p != '\t'; p++);
  203. X!         for (*p++ = '\0'; *p && (*p == ' ' || *p == '\t'); p++);
  204. X          for (aliases[n]->alias = p; *p && *p != '\n'; p++) {
  205. X              if ((*p == ' ' || *p == '\t') && *(p+1) && *(p+1) != '\n' &&
  206. X                 *(p-1) != *p && *(p-1) != ',') *p = ',';
  207. X             }
  208. X!         for (s = p - 1; *s == ',' || *s == ' ' || *s == '\t'; s--);
  209. X!         if (*++s == ',' || *s == ' ' || *s == '\t') *s = '\0';
  210. X          if (*p) *p = '\0';
  211. X         }
  212. X      aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec));
  213. X--- 175,215 ----
  214. X          aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec));
  215. X          for (; *p && (*p == ' ' || *p == '\t'); p++);
  216. X          for (aliases[n]->name = p; *p && *p != ' ' && *p != '\t'; p++);
  217. X!         for (*p++ = '\0'; *p && index(" \t\"\'", *p); p++);
  218. X!         testing_for_compound_address = True;
  219. X          for (aliases[n]->alias = p; *p && *p != '\n'; p++) {
  220. X+ /*
  221. X+ ** if it contains a chevron or parenthesis, treat whole line as just one alias
  222. X+ */
  223. X+             if (testing_for_compound_address) {
  224. X+                if ((s = index(p, '<')) || (s = index(p, '('))) {
  225. X+                   if (line = index(p, '\n')) {    /* could be more than one */
  226. X+                      if (s < line) {        /* if its within this alias */
  227. X+                         p = line;        /* point to end of this alias */
  228. X+                         if (*(p - 1) == '"' ||    /* could be true (no mailpid) */
  229. X+                             *(p - 1) == '\'')
  230. X+                             *(p - 1) = '\0';
  231. X+                         break;
  232. X+                        } else {
  233. X+                         if (*s == '<' && (s = index(p, '(')) && s < line) {
  234. X+                            p = line;        /* point to end of this alias */
  235. X+                            if (*(p - 1) == '"' || /* possibly not in mail */
  236. X+                                *(p - 1) == '\'')
  237. X+                                *(p - 1) = '\0';
  238. X+                            break;
  239. X+                           } else testing_for_compound_address = False;
  240. X+                        }
  241. X+                     } else {            /* last entry of this record */
  242. X+                      p += strlen(p);        /* point to the end of line */
  243. X+                      break;
  244. X+                     }
  245. X+                  } else testing_for_compound_address = False;
  246. X+               } /* end - if testing_for_compound_address */
  247. X              if ((*p == ' ' || *p == '\t') && *(p+1) && *(p+1) != '\n' &&
  248. X                 *(p-1) != *p && *(p-1) != ',') *p = ',';
  249. X             }
  250. X!         for (s = p - 1; index(", \t", *s); s--);
  251. X!         if (index(", \t", *++s)) *s = '\0';
  252. X          if (*p) *p = '\0';
  253. X         }
  254. X      aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec));
  255. X***************
  256. X*** 130,176 ****
  257. X     }
  258. X  /*
  259. X  ** If input is made up of more than one word, check each word for aliasing.
  260. X  */
  261. X!  if (value = tmp) {
  262. X      if (index(tmp, ',') || index(tmp, ' ') || index(tmp, '\t')) {
  263. X!        buf[0] = '\0';
  264. X!        for (p = value; *p;) {
  265. X!            for (; *p && *p != ',' && *p != ' ' && *p != '\t'; p++);
  266. X!            if (*p) *p++ = '\0';
  267. X             for (n = 0; aliases[n]; n++) {
  268. X                 if (strcmp(value, aliases[n]->name) == 0) {
  269. X!                   if (*buf) strcat(buf, ", ");
  270. X!                   strcat(buf, aliases[n]->alias);
  271. X                    break;
  272. X                   }
  273. X                }
  274. X!            if (! aliases[n]) {    /* If not an alias, use the name supplied. */
  275. X!               if (*buf) strcat(buf, ", ");
  276. X!               strcat(buf, value);
  277. X!              }
  278. X!            for (; *p && (*p == ',' || *p == ' ' || *p == '\t'); p++);
  279. X             value = p;
  280. X             if (*p) p++;
  281. X            }
  282. X!        value = buf;
  283. X!       } else {
  284. X! /*
  285. X! ** Otherwise, test the single word for aliasing, substituting if matched.
  286. X! */
  287. X!        for (n = 0; *tmp && aliases[n]; n++)
  288. X!            if (strcmp(tmp, aliases[n]->name) == 0) {
  289. X!               value = aliases[n]->alias;
  290. X                break;
  291. X               }
  292. X        }
  293. X     }
  294. X   return ((char *)value);
  295. X  } /* alias */
  296. X  
  297. X- 
  298. X  /*
  299. X  ** @(#)GetMailEnv() - Get environment value from mail or shell
  300. X! **                    Accomodate the case of trailing blanks on the item.
  301. X  */
  302. X  char *
  303. X  GetMailEnv(item)
  304. X--- 217,277 ----
  305. X     }
  306. X  /*
  307. X  ** If input is made up of more than one word, check each word for aliasing.
  308. X+ ** If it contains a chevron or parenthesis, it is a 'compound' address type.
  309. X+ ** If line length approaches 80 characters, add a newline-tab and continue.
  310. X  */
  311. X!  if (*(value = tmp)) {
  312. X!     buf[0] = '\0'; line = buf;
  313. X      if (index(tmp, ',') || index(tmp, ' ') || index(tmp, '\t')) {
  314. X!        for (p = value; *p;) {        /* 'value' points to current 'word' */
  315. X!            for (; *p && !index(", \t", *p); p++);
  316. X!            if (*p) {
  317. X!               if (((s = index(p, '(')) || (s = index(p, '<'))) &&
  318. X!                  NULL != index(p, ',') && s > index(p, ','))
  319. X!                  s = NULL;
  320. X!               if (*value != '(' && *value != '<' && s == NULL) {
  321. X!                  *p++ = '\0';        /* this is not a compound address */
  322. X!                 } else {        /* address has more than one word */
  323. X!                   if (*value == '(' || *value == '<')
  324. X!                      p = index(value, *value == '(' ? ')' : '>');
  325. X!                   else
  326. X!                      p = index(value, *s == '(' ? ')' : '>');
  327. X!                   if (*p == ' ' || *p == '\t') p++;
  328. X!                   for (; *p && !index(", \t", *p); p++);
  329. X!                   if (*p) *p++ = '\0';
  330. X!                 }
  331. X!              }
  332. X             for (n = 0; aliases[n]; n++) {
  333. X                 if (strcmp(value, aliases[n]->name) == 0) {
  334. X!                   de_alias(aliases[n]->alias, buf, &line, otherBuf);
  335. X                    break;
  336. X                   }
  337. X                }
  338. X!            if (! aliases[n])    /* If not an alias, use the name supplied. */
  339. X!               de_alias(value, buf, &line, otherBuf);
  340. X!            for (; *p && index(", \t", *p); p++);
  341. X             value = p;
  342. X             if (*p) p++;
  343. X            }
  344. X!       } else {    /* test single word for aliasing, substituting if matched. */
  345. X!        for (n = 0; aliases[n]; n++) {
  346. X!            if (strcmp(value, aliases[n]->name) == 0) {
  347. X!               de_alias(aliases[n]->alias, buf, &line, otherBuf);
  348. X                break;
  349. X               }
  350. X+           }
  351. X+        if (! aliases[n])    /* If not an alias, use the name supplied. */
  352. X+           de_alias(value, buf, &line, otherBuf);
  353. X        }
  354. X+     value = buf;
  355. X     }
  356. X   return ((char *)value);
  357. X  } /* alias */
  358. X  
  359. X  /*
  360. X  ** @(#)GetMailEnv() - Get environment value from mail or shell
  361. X! **                    Accommodate the case of trailing blanks on the item.
  362. X! **              Expand environment variables.
  363. X  */
  364. X  char *
  365. X  GetMailEnv(item)
  366. X***************
  367. X*** 210,219 ****
  368. X            value = XtMalloc(length + 1);
  369. X            strncpy(value, s, length);
  370. X            value[length] = '\0';
  371. X!          }
  372. X        }
  373. X      XtFree(mailenv);
  374. X     }
  375. X   return(value);
  376. X  } /* GetMailEnv */
  377. X  
  378. X--- 311,342 ----
  379. X            value = XtMalloc(length + 1);
  380. X            strncpy(value, s, length);
  381. X            value[length] = '\0';
  382. X!     }
  383. X        }
  384. X      XtFree(mailenv);
  385. X     }
  386. X+   /*
  387. X+    * Expand shell variables in value
  388. X+    */
  389. X+   if (value) {
  390. X+      char *v, *e, *nvalue;
  391. X+      while (s = index(value, '$')) {
  392. X+         for (c = s + 1; *c && !index(" \t\n$/\"\'", *c); c++);
  393. X+         length = c - s - 1;
  394. X+         strncpy(buf, s + 1, length);
  395. X+         buf[length] = '\0';
  396. X+         if (!(e = getenv(buf)))
  397. X+        e = "";
  398. X+         if (nvalue = XtMalloc(strlen(value) - length + strlen(c) + 2)) {
  399. X+            for (c = nvalue, v = value; v != s; *c++ = *v++);
  400. X+            for (s = e; *s; *c++ = *s++);
  401. X+            for (v += length + 1; *v; *c++ = *v++);
  402. X+            *c = '\0';
  403. X+            XtFree(value);
  404. X+            value = nvalue;
  405. X+           }
  406. X+        }
  407. X+     }
  408. X   return(value);
  409. X  } /* GetMailEnv */
  410. X  
  411. X***************
  412. X*** 245,277 ****
  413. X  char    *item;
  414. X  {
  415. X   FILE    *fp;
  416. X!  char    *s = NULL;
  417. X   char    buf[BUFSIZ];
  418. X  
  419. X  
  420. X   if ((fp = fopen(mailrcFile(), "r")) != NULL) {
  421. X      while (s = fgets(buf, BUFSIZ, fp)) {
  422. X!           if (strncmp(buf, "set", 3) == 0) {    /* if this is a 'set' record */
  423. X!              s = &buf[3];        /* starting just beyond the 'set'... */
  424. X               while (*s) {        /* there may be multiple assignments */
  425. X!                 for (; *s && (*s == ' ' || *s == '\t' || *s == '\n'); s++);
  426. X                  if (*s) {
  427. X!                    if (strncmp(s, item, strlen(item)) == 0)
  428. X                        break;
  429. X                    }
  430. X!                 for (; *s && *s != ' ' && *s != '\t' && *s != '\n'; s++);
  431. X                 }
  432. X               if (*s) {                /* we have found a match */
  433. X!                 s = s + strlen(item);        /* look for a value to it */
  434. X                  if (*s++ != '=') {        /* variable only, no value */
  435. X!                    s = XtNewString("True");    /* return a boolean string */
  436. X                    } else {
  437. X                     if (*s == '\"')        /* if surrounded by quotes */
  438. X!                       buf[strlen(buf) - 2] = '\0';
  439. X!                    else {
  440. X!                       buf[strlen(buf) - 1] = '\0';
  441. X!                       --s;
  442. X!                      }
  443. X                     strcpy(buf, ++s);
  444. X                     s = XtNewString(buf);
  445. X                    }
  446. X--- 368,405 ----
  447. X  char    *item;
  448. X  {
  449. X   FILE    *fp;
  450. X!  char    *c, *s = NULL;
  451. X   char    buf[BUFSIZ];
  452. X+  int    negate = strncmp(item, "no", 2) == 0 ? 1 : 0;
  453. X+  int    size = strlen(item) - 2 * negate;
  454. X+  int    unset;
  455. X  
  456. X  
  457. X   if ((fp = fopen(mailrcFile(), "r")) != NULL) {
  458. X      while (s = fgets(buf, BUFSIZ, fp)) {
  459. X!           if (strncmp(buf, "set", 3) == 0 ||    /* if this is a 'set' record */
  460. X!               strncmp(buf, "unset", 5) == 0) {    /* or this an 'unset' record */
  461. X!              unset = (buf[0] == 'u') ? 1 : 0;
  462. X!              s = &buf[(unset?5:3)];    /* starting just beyond the 'set'... */
  463. X               while (*s) {        /* there may be multiple assignments */
  464. X!                 for (; *s && index(" \t\n", *s); s++);
  465. X                  if (*s) {
  466. X!                    if (strncmp(s, item, size) == 0) break;
  467. X!                    if (unset && negate && strncmp(s, &item[2], size) == 0)
  468. X                        break;
  469. X                    }
  470. X!                 for (; *s && !index(" \t\n", *s); s++);
  471. X                 }
  472. X               if (*s) {                /* we have found a match */
  473. X!                 s = s + size;            /* look for a value to it */
  474. X                  if (*s++ != '=') {        /* variable only, no value */
  475. X!                    s = (unset && ! negate) ? NULL : XtNewString("True");
  476. X                    } else {
  477. X                     if (*s == '\"')        /* if surrounded by quotes */
  478. X!                       for (c = s + 1; *c && *c != '\"'; c++);
  479. X!                    else
  480. X!                       for (c = s--; *c && !index(" \t\n", *c); c++);
  481. X!                    *c = '\0';
  482. X                     strcpy(buf, ++s);
  483. X                     s = XtNewString(buf);
  484. X                    }
  485. X*** ../v1.1/global.h    Mon Jun  4 09:48:38 1990
  486. X--- global.h    Mon Aug 27 11:09:19 1990
  487. X***************
  488. X*** 32,38 ****
  489. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  490. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  491. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  492. X!  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  493. X   * PERFORMANCE OF THIS SOFTWARE.
  494. X   *
  495. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  496. X--- 32,38 ----
  497. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  498. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  499. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  500. X!  * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  501. X   * PERFORMANCE OF THIS SOFTWARE.
  502. X   *
  503. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  504. X***************
  505. X*** 64,69 ****
  506. X--- 64,70 ----
  507. X  extern String        Status_Help_Text;
  508. X  extern String        Subject_Help_Text;
  509. X  extern String        Text_Help_Text;
  510. X+ extern String        Text2_Help_Text;
  511. X  extern String        Title_Help_Text;
  512. X  extern String        To_Help_Text;
  513. X  
  514. X***************
  515. X*** 85,90 ****
  516. X--- 86,92 ----
  517. X  extern XtActionProc    MyNotify();        /* invokes callbacks w/ param */
  518. X  extern XtActionProc    NextField();        /* warps pointer to data fld */
  519. X  extern XtActionProc    PrintMsg();        /* send mail to the printer */
  520. X+ extern XtActionProc    SavePos();        /* save widget insert point */
  521. X  extern XtActionProc    SetAliases();        /* menu list of alias names */
  522. X  extern XtActionProc    SetCursor();        /* change between wait & norm */
  523. X  extern XtActionProc    SetDirectory();        /* create folder files list */
  524. X***************
  525. X*** 92,111 ****
  526. X  extern XtActionProc    SetHelp();        /* Position help popup text */
  527. X  extern XtActionProc    SetMenu();        /* Position set_menu popup */
  528. X  extern XtActionProc    SetPopup();        /* Position relative to owner */
  529. X  extern XtActionProc    SetSelect();        /* reposition select mark */
  530. X  extern XtActionProc    Quit();            /* termination procedure */
  531. X  
  532. X  /* callbacks.c */
  533. X  
  534. X! extern XtCallbackProc    Autograph();        /* Adds Signature to message */
  535. X! extern XtCallbackProc    Done();            /* Completes mail delivery */
  536. X  extern XtCallbackProc    DoIt();            /* callback do specified cmd */
  537. X  extern XtCallbackProc    DoPrint();        /* callback printer execution */
  538. X  extern XtCallbackProc    DoQuit();        /* callback termination func */
  539. X  extern XtCallbackProc    DoSet();        /* callback to toggle options */
  540. X  extern XtCallbackProc    DoWith();        /* do cmd with arguments */
  541. X  extern XtCallbackProc    GetAliasName();        /* retrieve alias name */
  542. X  extern XtCallbackProc    GetFolderName();    /* retrieve folder name */
  543. X  extern XtCallbackProc    Reply();        /* use msg author and subject */
  544. X  extern XtCallbackProc    Save();            /* callback save routine */
  545. X  extern XtCallbackProc    SetNewmail();        /* highlight when new mail */
  546. X--- 94,116 ----
  547. X  extern XtActionProc    SetHelp();        /* Position help popup text */
  548. X  extern XtActionProc    SetMenu();        /* Position set_menu popup */
  549. X  extern XtActionProc    SetPopup();        /* Position relative to owner */
  550. X+ extern XtActionProc    SetPos();        /* reset widget insert point */
  551. X  extern XtActionProc    SetSelect();        /* reposition select mark */
  552. X  extern XtActionProc    Quit();            /* termination procedure */
  553. X  
  554. X  /* callbacks.c */
  555. X  
  556. X! extern XtCallbackProc    Autograph();        /* adds Signature to message */
  557. X! extern XtCallbackProc    Done();            /* completes mail delivery */
  558. X  extern XtCallbackProc    DoIt();            /* callback do specified cmd */
  559. X  extern XtCallbackProc    DoPrint();        /* callback printer execution */
  560. X  extern XtCallbackProc    DoQuit();        /* callback termination func */
  561. X  extern XtCallbackProc    DoSet();        /* callback to toggle options */
  562. X  extern XtCallbackProc    DoWith();        /* do cmd with arguments */
  563. X+ extern XtCallbackProc    DropIt();        /* destroy Folder popup list */
  564. X  extern XtCallbackProc    GetAliasName();        /* retrieve alias name */
  565. X  extern XtCallbackProc    GetFolderName();    /* retrieve folder name */
  566. X+ extern XtCallbackProc    ReEdit();        /* re-edit the mail message */
  567. X  extern XtCallbackProc    Reply();        /* use msg author and subject */
  568. X  extern XtCallbackProc    Save();            /* callback save routine */
  569. X  extern XtCallbackProc    SetNewmail();        /* highlight when new mail */
  570. X***************
  571. X*** 115,120 ****
  572. X--- 120,129 ----
  573. X  
  574. X  extern void        callMail();        /* fork child, exec mail */
  575. X  
  576. X+ /* confirm.c */
  577. X+ 
  578. X+ extern Bool        Confirm();        /* Confirm destructive acts */
  579. X+ 
  580. X  /* environs.c */
  581. X  
  582. X  extern char        *GetMailEnv();        /* get value from mail env */
  583. X***************
  584. X*** 129,141 ****
  585. X  
  586. X  /* mail.c */
  587. X  
  588. X  extern XtInputCallbackProc readMail();        /* get data from mail */
  589. X- extern void         writeMail();        /* send data to mail */
  590. X  extern void         sendMail();        /* used by Send/Reply cmds */
  591. X  
  592. X  /* parser.c */
  593. X  
  594. X  extern void        parser_init();        /* compile patterns */
  595. X  extern void        parse();        /* parse mail output */
  596. X  extern char        *QueryMail();        /* ask mail for info */
  597. X  
  598. X--- 138,152 ----
  599. X  
  600. X  /* mail.c */
  601. X  
  602. X+ extern void         editMail();        /* create/compose a message */
  603. X  extern XtInputCallbackProc readMail();        /* get data from mail */
  604. X  extern void         sendMail();        /* used by Send/Reply cmds */
  605. X+ extern void         writeMail();        /* send data to mail */
  606. X  
  607. X  /* parser.c */
  608. X  
  609. X  extern void        parser_init();        /* compile patterns */
  610. X+ extern int        match();        /* eval command or output */
  611. X  extern void        parse();        /* parse mail output */
  612. X  extern char        *QueryMail();        /* ask mail for info */
  613. X  
  614. X***************
  615. X*** 166,171 ****
  616. X--- 177,183 ----
  617. X  extern void        CreateTextWindow();    /* another text window */
  618. X  extern void        CreateTitleBar();    /* a text output window */
  619. X  extern Widget        CreateInputWindow();    /* To, Subject, Cc, and Bcc */
  620. X+ extern void        ParseIconGeometry();    /* Parse icon geometry */
  621. X  
  622. X  /* xmail.c */
  623. X  
  624. X***************
  625. X*** 172,177 ****
  626. X--- 184,193 ----
  627. X  extern void        initialize();        /* main initialization code */
  628. X  extern char        **mailoptions();    /* sets up call to mail pgm */
  629. X  
  630. X+ /* extern functions */
  631. X+ 
  632. X+ extern char    *index(), *rindex();
  633. X+ 
  634. X  /* extern variables */
  635. X  
  636. X  extern char    *IndexBuf;        /* buffer for index widget    */
  637. X***************
  638. X*** 184,190 ****
  639. X  extern char     BccBuf[BUFSIZ];        /* message Bcc list        */
  640. X  extern char     tmpName[BUFSIZ];    /* message temporary filename    */
  641. X  extern char     *MailPrompt;        /* mail program prompt string    */
  642. X! extern char    *HelpNames[24];        /* array of help window names    */
  643. X  extern char    **mailargv;        /* array passed to mail child    */
  644. X  
  645. X  extern Pixmap    hatch;            /* cross_weave, used for Newmail */
  646. X--- 200,206 ----
  647. X  extern char     BccBuf[BUFSIZ];        /* message Bcc list        */
  648. X  extern char     tmpName[BUFSIZ];    /* message temporary filename    */
  649. X  extern char     *MailPrompt;        /* mail program prompt string    */
  650. X! extern char    *HelpNames[25];        /* array of help window names    */
  651. X  extern char    **mailargv;        /* array passed to mail child    */
  652. X  
  653. X  extern Pixmap    hatch;            /* cross_weave, used for Newmail */
  654. X***************
  655. X*** 194,200 ****
  656. X  
  657. X  extern AliasRecPtr    *aliases;    /* array of mail alias strings    */
  658. X  extern XmailResources    XMail;        /* XMail application resources */
  659. X! extern XtTextSource    HelpStrings[23];
  660. X  extern XFontStruct    *TextFontStr, *HelpFontStr;
  661. X  
  662. X  extern int    mail_fd;        /* descriptor to mail process i/o */
  663. X--- 210,216 ----
  664. X  
  665. X  extern AliasRecPtr    *aliases;    /* array of mail alias strings    */
  666. X  extern XmailResources    XMail;        /* XMail application resources */
  667. X! extern XtTextSource    HelpStrings[24];
  668. X  extern XFontStruct    *TextFontStr, *HelpFontStr;
  669. X  
  670. X  extern int    mail_fd;        /* descriptor to mail process i/o */
  671. X*** ../v1.1/handler.c    Mon Jun  4 09:48:39 1990
  672. X--- handler.c    Mon Aug 27 11:09:19 1990
  673. X***************
  674. X*** 32,38 ****
  675. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  676. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  677. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  678. X!  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  679. X   * PERFORMANCE OF THIS SOFTWARE.
  680. X   *
  681. X   * The following software modules were created and are Copyrighted by National
  682. X--- 32,38 ----
  683. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  684. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  685. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  686. X!  * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  687. X   * PERFORMANCE OF THIS SOFTWARE.
  688. X   *
  689. X   * The following software modules were created and are Copyrighted by National
  690. X***************
  691. X*** 53,68 ****
  692. X  #include "xmailregex.h"
  693. X  #include "MailwatchP.h"
  694. X  
  695. X! #if XtSpecificationRelease >= 4
  696. X! #include <X11/Xaw/LabelP.h>        /* R4 */
  697. X! #else
  698. X  #include <X11/LabelP.h>            /* R3 */
  699. X  #endif
  700. X  
  701. X  /*
  702. X! ** This is unwise, because it depends on a Label Widget's private parts.
  703. X! ** Examine the current value of the titleBar label and return true/false
  704. X! ** does it match the system mail folder name?
  705. X  */
  706. X  int
  707. X  In_System_Folder(w)
  708. X--- 53,67 ----
  709. X  #include "xmailregex.h"
  710. X  #include "MailwatchP.h"
  711. X  
  712. X! #if XtSpecificationRelease < 4
  713. X  #include <X11/LabelP.h>            /* R3 */
  714. X+ #else
  715. X+ #include <X11/Xaw/LabelP.h>        /* R4 */
  716. X  #endif
  717. X  
  718. X  /*
  719. X! ** Examine the current value of the titleBar label and return TRUE/FALSE
  720. X! ** to the question "Does it match the system mail folder name?"
  721. X  */
  722. X  int
  723. X  In_System_Folder(w)
  724. X***************
  725. X*** 69,80 ****
  726. X  Widget    w;
  727. X  {
  728. X   int         result;
  729. X!  char         *cp, *index(), *rindex(), buf[BUFSIZ];
  730. X   MailwatchWidget mb = (MailwatchWidget) WidgetOf(w, "mailbox");
  731. X   LabelWidget     tb = (LabelWidget) WidgetOf(WidgetOf(WidgetOf(toplevel,
  732. X                      "topBox"), "titleBar"), "titleBar");
  733. X  
  734. X!  strcpy(buf, tb->label.label);        /* XtGetValues didn't work in R3 */
  735. X   if ((cp = rindex(buf, '"')) == NULL) result = FALSE;
  736. X   else {                    /* if a current folder name exists */
  737. X      *cp = NULL;                /* chop off the rest of the label */
  738. X--- 68,83 ----
  739. X  Widget    w;
  740. X  {
  741. X   int         result;
  742. X!  char         *cp, buf[BUFSIZ];
  743. X!  Arg         args[1];
  744. X   MailwatchWidget mb = (MailwatchWidget) WidgetOf(w, "mailbox");
  745. X   LabelWidget     tb = (LabelWidget) WidgetOf(WidgetOf(WidgetOf(toplevel,
  746. X                      "topBox"), "titleBar"), "titleBar");
  747. X  
  748. X!  XtSetArg(args[0], XtNlabel, (XtArgVal) NULL);
  749. X!  XtGetValues(tb, args, ONE);
  750. X!  strcpy(buf, (char *)args[0].value);
  751. X! 
  752. X   if ((cp = rindex(buf, '"')) == NULL) result = FALSE;
  753. X   else {                    /* if a current folder name exists */
  754. X      *cp = NULL;                /* chop off the rest of the label */
  755. X***************
  756. X*** 160,166 ****
  757. X  int    msg_num;
  758. X  int    undeleting;
  759. X  {
  760. X!  char        *c, *s, *index();
  761. X   Arg            args[2];
  762. X   Cardinal     j, k;
  763. X   Widget        iw;
  764. X--- 163,169 ----
  765. X  int    msg_num;
  766. X  int    undeleting;
  767. X  {
  768. X!  char        *c, *s;
  769. X   Arg            args[2];
  770. X   Cardinal     j, k;
  771. X   Widget        iw;
  772. X***************
  773. X*** 225,231 ****
  774. X  file_handler(show_latest)
  775. X  int    show_latest;
  776. X  {
  777. X!  char    *c, *s, *p, *index(), msgnum_str[10];
  778. X   int    more_than_one, msg_num = 0;        /* zero means no message */
  779. X   Widget    iw = WidgetOf(WidgetOf(toplevel, "topBox"), "indexWindow");
  780. X  
  781. X--- 228,234 ----
  782. X  file_handler(show_latest)
  783. X  int    show_latest;
  784. X  {
  785. X!  char    *c, *s, *p, msgnum_str[10];
  786. X   int    more_than_one, msg_num = 0;        /* zero means no message */
  787. X   Widget    iw = WidgetOf(WidgetOf(toplevel, "topBox"), "indexWindow");
  788. X  
  789. X*** ../v1.1/icon.mail    Mon Jun  4 09:46:36 1990
  790. X--- icon.mail    Mon Aug 27 11:09:19 1990
  791. X***************
  792. X*** 29,64 ****
  793. X  #define mail_height 56
  794. X  
  795. X  static char mail_bits[] = {
  796. X!  0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
  797. X!  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00,
  798. X!  0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
  799. X!  0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,
  800. X!  0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  801. X!  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00,
  802. X!  0x00, 0x18, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x03, 0x00,
  803. X!  0x00, 0x00, 0x00, 0x07, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30,
  804. X!  0x06, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0xe0,
  805. X!  0x1f, 0xb0, 0x07, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x06, 0x00, 0x00,
  806. X!  0x00, 0xb8, 0xee, 0x70, 0x06, 0x00, 0x00, 0x00, 0x5c, 0xd7, 0x31, 0x06,
  807. X!  0x00, 0x00, 0x00, 0xae, 0xae, 0x39, 0x06, 0x00, 0x00, 0x00, 0x56, 0x5d,
  808. X!  0x3f, 0x06, 0x00, 0x00, 0x00, 0x8a, 0xb4, 0x37, 0x06, 0x00, 0x00, 0x00,
  809. X!  0x46, 0x64, 0x33, 0x06, 0x00, 0x00, 0x00, 0x22, 0xc4, 0x33, 0x06, 0x00,
  810. X!  0x00, 0x00, 0x12, 0x84, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x33,
  811. X!  0x06, 0x00, 0xff, 0xff, 0xfa, 0x07, 0x33, 0xf6, 0xff, 0x00, 0x00, 0x0a,
  812. X!  0x00, 0x33, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x03, 0x03, 0x00, 0x00,
  813. X!  0x00, 0x3a, 0x80, 0x83, 0x01, 0x00, 0x00, 0x00, 0x7a, 0x40, 0xc3, 0x00,
  814. X!  0x00, 0x00, 0x00, 0xfa, 0xa0, 0x63, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x51,
  815. X!  0x33, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x3b, 0x00, 0x00, 0x00, 0x00,
  816. X!  0x3a, 0x06, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x37, 0x00, 0x00,
  817. X!  0x00, 0x00, 0x0a, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x31,
  818. X!  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x31, 0x00, 0x00, 0x00, 0x00, 0x02,
  819. X!  0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x31, 0x00, 0x00, 0x00,
  820. X!  0x00, 0xaa, 0x2b, 0x31, 0x00, 0x00, 0x00, 0x00, 0xba, 0x2a, 0x31, 0x00,
  821. X!  0x00, 0x00, 0x00, 0x2a, 0x29, 0x31, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
  822. X!  0x31, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00,
  823. X!  0x52, 0x15, 0x31, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x31, 0x00, 0x00,
  824. X!  0xee, 0x28, 0x82, 0x02, 0x31, 0x20, 0x11, 0x88, 0x22, 0x12, 0x11, 0x2d,
  825. X!  0x29, 0x00, 0x29, 0xc8, 0xa2, 0x0b, 0xad, 0x40, 0x9a, 0xc4, 0x4a, 0xc6,
  826. X!  0x86, 0x87, 0x4e, 0x1a, 0xcb, 0x67, 0x07, 0xc2, 0x7e, 0xee, 0x3f, 0xbf,
  827. X!  0xdc, 0x8e, 0xc7, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x1d, 0x63, 0x72, 0xb9,
  828. X!  0x7b, 0xfd, 0x72, 0xf9, 0x7f, 0x4e, 0xe7, 0xd4 };
  829. X--- 29,64 ----
  830. X  #define mail_height 56
  831. X  
  832. X  static char mail_bits[] = {
  833. X!    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
  834. X!    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00,
  835. X!    0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
  836. X!    0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,
  837. X!    0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  838. X!    0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00,
  839. X!    0x00, 0x18, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x03, 0x00,
  840. X!    0x00, 0x00, 0x00, 0x07, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30,
  841. X!    0x06, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0xe0,
  842. X!    0x1f, 0xb0, 0x07, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x06, 0x00, 0x00,
  843. X!    0x00, 0xb8, 0xee, 0x70, 0x06, 0x00, 0x00, 0x00, 0x5c, 0xd7, 0x31, 0x06,
  844. X!    0x00, 0x00, 0x00, 0xae, 0xae, 0x39, 0x06, 0x00, 0x00, 0x00, 0x56, 0x5d,
  845. X!    0x3f, 0x06, 0x00, 0x00, 0x00, 0x8a, 0xb4, 0x37, 0x06, 0x00, 0x00, 0x00,
  846. X!    0x46, 0x64, 0x33, 0x06, 0x00, 0x00, 0x00, 0x22, 0xc4, 0x33, 0x06, 0x00,
  847. X!    0x00, 0x00, 0x12, 0x84, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x33,
  848. X!    0x06, 0x00, 0x00, 0x00, 0xfa, 0x07, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a,
  849. X!    0x00, 0x33, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x03, 0x03, 0x00, 0x00,
  850. X!    0x00, 0x3a, 0x80, 0x83, 0x01, 0x00, 0x00, 0x00, 0x7a, 0x40, 0xc3, 0x00,
  851. X!    0x00, 0x00, 0x00, 0xfa, 0xa0, 0x63, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x51,
  852. X!    0x33, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x1b, 0x00, 0x00, 0x00, 0x00,
  853. X!    0x3a, 0x06, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x00,
  854. X!    0x00, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
  855. X!    0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x02,
  856. X!    0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x19, 0x00, 0x00, 0x00,
  857. X!    0x00, 0xaa, 0x2b, 0x19, 0x00, 0x00, 0x00, 0x00, 0xba, 0x2a, 0x19, 0x00,
  858. X!    0x00, 0x00, 0x00, 0x2a, 0x29, 0x19, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00,
  859. X!    0x19, 0x00, 0x80, 0x85, 0xd8, 0x02, 0x00, 0x99, 0x02, 0x40, 0xc5, 0x92,
  860. X!    0x52, 0x15, 0x59, 0x46, 0x42, 0x69, 0xb2, 0xaa, 0x2a, 0xb9, 0x44, 0xc6,
  861. X!    0xee, 0xaa, 0x82, 0x02, 0x79, 0x64, 0xb5, 0x8a, 0x22, 0x12, 0x11, 0xad,
  862. X!    0xa9, 0x10, 0x29, 0xc8, 0xa2, 0x0b, 0xad, 0xc0, 0xba, 0xc4, 0x4a, 0xc6,
  863. X!    0x86, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0x07, 0xc2, 0x7e, 0xee, 0x3f, 0xb7,
  864. X!    0xdc, 0x8e, 0xc7, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x1d, 0x63, 0x72, 0xb9,
  865. X!    0x7b, 0xfd, 0x72, 0xf9, 0x7f, 0x4e, 0xe7, 0xd4};
  866. X*** ../v1.1/icon.nomail    Mon Jun  4 09:46:41 1990
  867. X--- icon.nomail    Mon Aug 27 11:09:20 1990
  868. X***************
  869. X*** 29,64 ****
  870. X  #define no_mail_height 56
  871. X  
  872. X  static char no_mail_bits[] = {
  873. X!  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  874. X!  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  875. X!  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  876. X!  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  877. X!  0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  878. X!  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00,
  879. X!  0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x04,
  880. X!  0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00,
  881. X!  0x06, 0x07, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x87, 0x07, 0x00, 0x00, 0xe0,
  882. X!  0x1f, 0x80, 0xc7, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0xc0, 0xe6, 0x07, 0x00,
  883. X!  0x00, 0xf8, 0xe2, 0x60, 0x76, 0x07, 0x00, 0x00, 0x9c, 0xce, 0x31, 0x3e,
  884. X!  0x03, 0x00, 0x00, 0x8e, 0x86, 0x19, 0x1e, 0x01, 0x00, 0x00, 0x86, 0x03,
  885. X!  0x0f, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00,
  886. X!  0xc2, 0x06, 0x83, 0x07, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0xc3, 0x07, 0x00,
  887. X!  0x00, 0x00, 0x12, 0x11, 0xe3, 0x06, 0x00, 0x00, 0x00, 0x82, 0x02, 0x73,
  888. X!  0x06, 0x00, 0xff, 0xff, 0xaa, 0x2a, 0x33, 0xf6, 0xff, 0x00, 0x00, 0x52,
  889. X!  0x15, 0x13, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x03, 0x00, 0x00,
  890. X!  0x00, 0x02, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x29, 0xc3, 0x00,
  891. X!  0x00, 0x00, 0x00, 0xba, 0x2a, 0x63, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2b,
  892. X!  0x33, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x3b, 0x00, 0x00, 0x00, 0x00,
  893. X!  0x02, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x37, 0x00, 0x00,
  894. X!  0x00, 0x00, 0xfe, 0xff, 0x33, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x31,
  895. X!  0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60,
  896. X!  0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00,
  897. X!  0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00,
  898. X!  0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
  899. X!  0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00,
  900. X!  0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00,
  901. X!  0xee, 0x28, 0x68, 0x60, 0x3a, 0x21, 0x11, 0x88, 0x22, 0x76, 0x60, 0x2c,
  902. X!  0x29, 0x00, 0x29, 0xc8, 0x76, 0x60, 0xaf, 0x40, 0x9a, 0xc4, 0x4a, 0x72,
  903. X!  0xe0, 0x87, 0x4e, 0x1a, 0xcb, 0x67, 0x7b, 0xe2, 0x7c, 0xee, 0x3f, 0xbf,
  904. X!  0xdc, 0x66, 0xe9, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x6d, 0xba, 0x73, 0xb9,
  905. X!  0x7b, 0xfd, 0x72, 0x9b, 0xda, 0x4e, 0xe7, 0xd4 };
  906. X--- 29,64 ----
  907. X  #define no_mail_height 56
  908. X  
  909. X  static char no_mail_bits[] = {
  910. X!    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  911. X!    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  912. X!    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  913. X!    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  914. X!    0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  915. X!    0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00,
  916. X!    0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x04,
  917. X!    0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00,
  918. X!    0x06, 0x07, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x87, 0x07, 0x00, 0x00, 0xe0,
  919. X!    0x1f, 0x80, 0xc7, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0xc0, 0xe6, 0x07, 0x00,
  920. X!    0x00, 0xf8, 0xe2, 0x60, 0x76, 0x07, 0x00, 0x00, 0x9c, 0xce, 0x31, 0x3e,
  921. X!    0x03, 0x00, 0x00, 0x8e, 0x86, 0x19, 0x1e, 0x01, 0x00, 0x00, 0x86, 0x03,
  922. X!    0x0f, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00,
  923. X!    0xc2, 0x06, 0x83, 0x07, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0xc3, 0x07, 0x00,
  924. X!    0x00, 0x00, 0x12, 0x11, 0xe3, 0x06, 0x00, 0x00, 0x00, 0x82, 0x02, 0x73,
  925. X!    0x06, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x33, 0x06, 0x00, 0x00, 0x00, 0x52,
  926. X!    0x15, 0x13, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x03, 0x00, 0x00,
  927. X!    0x00, 0x02, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x29, 0xc3, 0x00,
  928. X!    0x00, 0x00, 0x00, 0xba, 0x2a, 0x63, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2b,
  929. X!    0x33, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x1b, 0x00, 0x00, 0x00, 0x00,
  930. X!    0x02, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x00,
  931. X!    0x00, 0x00, 0xfe, 0xff, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
  932. X!    0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0,
  933. X!    0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00,
  934. X!    0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00,
  935. X!    0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0,
  936. X!    0x18, 0x00, 0x80, 0x85, 0xd8, 0xca, 0xc0, 0x98, 0x02, 0x40, 0xc5, 0x92,
  937. X!    0xca, 0xc0, 0x58, 0x46, 0x42, 0x69, 0xb2, 0xe4, 0xc0, 0xb8, 0x44, 0xc6,
  938. X!    0xee, 0xaa, 0xe8, 0xc0, 0x78, 0x64, 0xb5, 0x8a, 0x22, 0xd6, 0xc0, 0xac,
  939. X!    0xa9, 0x10, 0x29, 0xc8, 0xd6, 0xd5, 0xaf, 0xc0, 0xba, 0xc4, 0x4a, 0xd2,
  940. X!    0xe9, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0xfb, 0xca, 0x7c, 0xee, 0x3f, 0xb7,
  941. X!    0xdc, 0xe6, 0xe9, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0xed, 0xba, 0x73, 0xb9,
  942. X!    0x7b, 0xfd, 0x72, 0x9b, 0xda, 0x4e, 0xe7, 0xd4};
  943. X*** ../v1.1/mail.c    Mon Jun  4 09:48:39 1990
  944. X--- mail.c    Mon Aug 27 11:09:20 1990
  945. X***************
  946. X*** 32,59 ****
  947. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  948. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  949. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  950. X!  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  951. X   * PERFORMANCE OF THIS SOFTWARE.
  952. X   *
  953. X   * The following software modules were created and are Copyrighted by National
  954. X   * Semiconductor Corporation:
  955. X   *
  956. X!  * 1. sendMail: 
  957. X   *
  958. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  959. X   *
  960. X   */
  961. X- 
  962. X- 
  963. X  #include "global.h"
  964. X  
  965. X  #ifndef    DEFAULT_VISUAL
  966. X  #define    DEFAULT_VISUAL    "/usr/ucb/vi"
  967. X  #endif
  968. X  
  969. X  /*
  970. X! ** @(#)readMail() - callback invoked everytime input is pending on mail fd
  971. X  **
  972. X  ** Calls QueryMail() to read all available data from mail file descriptor,
  973. X  ** and passes output to parse() for analysis and appropriate action.
  974. X  */
  975. X--- 32,133 ----
  976. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  977. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  978. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  979. X!  * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  980. X   * PERFORMANCE OF THIS SOFTWARE.
  981. X   *
  982. X   * The following software modules were created and are Copyrighted by National
  983. X   * Semiconductor Corporation:
  984. X   *
  985. X!  * 1. editMail: 
  986. X!  * 2. sendMail: 
  987. X   *
  988. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  989. X   *
  990. X   */
  991. X  #include "global.h"
  992. X+ #include <sys/wait.h>
  993. X+ #include <sys/stat.h>
  994. X  
  995. X  #ifndef    DEFAULT_VISUAL
  996. X  #define    DEFAULT_VISUAL    "/usr/ucb/vi"
  997. X  #endif
  998. X  
  999. X+ 
  1000. X  /*
  1001. X! ** @(#)editMail() - edit a mail message using the preferred editor
  1002. X  **
  1003. X+ ** Try to accommodate those editors (emacs, xedit,...) which start their own
  1004. X+ ** windows in X11.  We know for a fact that vi and ed do not.  We assume (for
  1005. X+ ** now) that any other editor selection does.
  1006. X+ */
  1007. X+ void
  1008. X+ editMail()
  1009. X+ {
  1010. X+  Display    *ad;
  1011. X+  char        *Argv[11], *Editor, *pgm;
  1012. X+  char        cmd[BUFSIZ];
  1013. X+  int        ed_or_vi, editor_pid;
  1014. X+  union wait    status;
  1015. X+ 
  1016. X+ 
  1017. X+  ad  = XtDisplay(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow"));
  1018. X+ 
  1019. X+  if ((Editor = GetMailEnv("VISUAL")) == NULL)
  1020. X+       Editor = XtNewString(DEFAULT_VISUAL);
  1021. X+ 
  1022. X+  if ((pgm = rindex(Editor, '/')) == NULL) pgm = Editor;
  1023. X+  else ++pgm;
  1024. X+ 
  1025. X+  ed_or_vi = (strcmp(pgm, "ed") == 0 || strcmp(pgm, "vi") == 0) ? 1 : 0;
  1026. X+ 
  1027. X+  editor_pid = fork();
  1028. X+  switch (editor_pid) {
  1029. X+     case -1:            /* fork failed ... revert to a system call */
  1030. X+          if (ed_or_vi)
  1031. X+             sprintf(cmd, "xterm -display %s -name XMail \
  1032. X+                          -title \"xmail message entry\" -e %s %s",
  1033. X+                          ad->display_name, Editor, tmpName);
  1034. X+          else
  1035. X+             sprintf(cmd, "%s -display %s -name XMail \
  1036. X+             -title \"xmail message entry\" %s",
  1037. X+             Editor, ad->display_name, tmpName);
  1038. X+ 
  1039. X+          system(cmd);
  1040. X+          break;
  1041. X+     case 0:            /* child starts the message entry session */
  1042. X+          Argv[0] = (ed_or_vi) ? "/usr/bin/X11/xterm" : Editor;
  1043. X+          Argv[1] = "-display";
  1044. X+          Argv[2] = ad->display_name;
  1045. X+          Argv[3] = "-name";
  1046. X+          Argv[4] = "XMail";
  1047. X+          Argv[5] = "-title";
  1048. X+          Argv[6] = "xmail message entry";
  1049. X+          if (ed_or_vi) {
  1050. X+             Argv[7] = "-e";
  1051. X+             Argv[8] = Editor;
  1052. X+             Argv[9] = tmpName;
  1053. X+             Argv[10] = NULL;
  1054. X+            } else {
  1055. X+             Argv[7] = tmpName;
  1056. X+             Argv[8] = NULL;
  1057. X+            }
  1058. X+          execvp(Argv[0], Argv);
  1059. X+          perror("editMail: Failed to start editor");
  1060. X+          _exit();
  1061. X+          break;
  1062. X+     default:            /* wait for child to finish before continuing */
  1063. X+          while (wait3(&status, WNOHANG, NULL) != editor_pid)
  1064. X+                ProcessOneEvent(XtDisplay(toplevel));
  1065. X+          break;
  1066. X+    }
  1067. X+ 
  1068. X+  XtFree(Editor);
  1069. X+ } /* editMail */
  1070. X+ 
  1071. X+ 
  1072. X+ /*
  1073. X+ ** @(#)readMail() - callback invoked every time input is pending on mail fd
  1074. X+ **
  1075. X  ** Calls QueryMail() to read all available data from mail file descriptor,
  1076. X  ** and passes output to parse() for analysis and appropriate action.
  1077. X  */
  1078. X***************
  1079. X*** 68,104 ****
  1080. X  
  1081. X  
  1082. X  /*
  1083. X- ** @(#)writeMail() - Write s to mail, and flush the output.
  1084. X- */
  1085. X- void
  1086. X- writeMail(s) 
  1087. X- char *s;
  1088. X- {
  1089. X-  write(mail_fd, s, strlen(s));
  1090. X- } /* writeMail */
  1091. X- 
  1092. X- 
  1093. X- /*
  1094. X  ** @(#)sendMail() - send a mail message to the indicated recipient(s)
  1095. X  */
  1096. X  /* ARGSUSED */
  1097. X  void
  1098. X  sendMail(parent)
  1099. X! Widget parent;
  1100. X  {
  1101. X!  Arg            args[10];
  1102. X!  Display        *ad;
  1103. X!  Widget            Popup, Layout;
  1104. X!  Widget            lab1, lab2, lab3, lab4;
  1105. X!  Widget            To, Subject, Cclist, Bcc, Last;
  1106. X!  Window            aw, dumy;
  1107. X!  String            Editor, pgm;
  1108. X!  menuList_p        *list;
  1109. X!  menuList        b1, b2, b3;
  1110. X!  char            *rindex(), cmd[BUFSIZ];
  1111. X!  int            x, y, scn;
  1112. X  
  1113. X  
  1114. X   aw  = XtWindow(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow"));
  1115. X   ad  = XtDisplay(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow"));
  1116. X   scn = DefaultScreen(ad);
  1117. X--- 142,167 ----
  1118. X  
  1119. X  
  1120. X  /*
  1121. X  ** @(#)sendMail() - send a mail message to the indicated recipient(s)
  1122. X  */
  1123. X  /* ARGSUSED */
  1124. X  void
  1125. X  sendMail(parent)
  1126. X! Widget    parent;
  1127. X  {
  1128. X!  Arg        args[10];
  1129. X!  Display    *ad;
  1130. X!  Widget        Popup, Layout;
  1131. X!  Widget        lab1, lab2, lab3, lab4;
  1132. X!  Widget        To, Subject, Cclist, Bcc, Last;
  1133. X!  Window        aw, dumy;
  1134. X!  menuList_p    *list;
  1135. X!  menuList    b1, b2, b3, b4;
  1136. X!  int        x, y, scn;
  1137. X  
  1138. X  
  1139. X+  editMail();
  1140. X+ 
  1141. X   aw  = XtWindow(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow"));
  1142. X   ad  = XtDisplay(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow"));
  1143. X   scn = DefaultScreen(ad);
  1144. X***************
  1145. X*** 207,222 ****
  1146. X   b1.label = "Deliver the message";
  1147. X   b1.func  = (XtCallbackProc) Done;
  1148. X   b1.data  = "Deliver";
  1149. X!  b2.label = "Cancel message and delete";
  1150. X!  b2.func  = (XtCallbackProc) Done;
  1151. X!  b2.data  = "Cancel";
  1152. X   b3.label = "Cancel, save in DEAD folder";
  1153. X   b3.func  = (XtCallbackProc) Done;
  1154. X   b3.data  = "cancel";
  1155. X!  list[0] = &b1; list[1] = &b2; list[2] = &b3; list[3] = NULL;
  1156. X  
  1157. X   AddMenuWindow(Last, "Deliver", "DoDone", list);
  1158. X  
  1159. X   AddHelpText(Last, "Deliver", Deliver_Help_Text);
  1160. X  
  1161. X   Normalize(To);
  1162. X--- 270,289 ----
  1163. X   b1.label = "Deliver the message";
  1164. X   b1.func  = (XtCallbackProc) Done;
  1165. X   b1.data  = "Deliver";
  1166. X!  b2.label = "Re-edit the message";
  1167. X!  b2.func  = (XtCallbackProc) ReEdit;
  1168. X!  b2.data  = "ReEdit";
  1169. X   b3.label = "Cancel, save in DEAD folder";
  1170. X   b3.func  = (XtCallbackProc) Done;
  1171. X   b3.data  = "cancel";
  1172. X!  b4.label = "Cancel message and delete";
  1173. X!  b4.func  = (XtCallbackProc) Done;
  1174. X!  b4.data  = "Cancel";
  1175. X!  list[0] = &b1; list[1] = &b2; list[2] = &b3; list[3] = &b4; list[4] = NULL;
  1176. X  
  1177. X   AddMenuWindow(Last, "Deliver", "DoDone", list);
  1178. X  
  1179. X+  XtFree(list);
  1180. X   AddHelpText(Last, "Deliver", Deliver_Help_Text);
  1181. X  
  1182. X   Normalize(To);
  1183. X***************
  1184. X*** 224,245 ****
  1185. X   Normalize(Cclist);
  1186. X   Normalize(Bcc);
  1187. X  
  1188. X-  XtFree(list);
  1189. X- 
  1190. X-  if ((Editor = GetMailEnv("VISUAL")) == NULL)
  1191. X-       Editor = XtNewString(DEFAULT_VISUAL);
  1192. X- 
  1193. X-  if ((pgm = rindex(Editor, '/')) == NULL) pgm = Editor;
  1194. X-  else ++pgm;
  1195. X- 
  1196. X-  sprintf(cmd, "xterm -display %s -name \"XMail\" -T \"xmail message entry\" \
  1197. X-  -n xmail_%s -e %s %s", ad->display_name, pgm, Editor, tmpName);
  1198. X-                        
  1199. X-  system(cmd);
  1200. X- 
  1201. X-  XtFree(Editor);
  1202. X- 
  1203. X   XtPopup(Popup, XtGrabNone);
  1204. X  
  1205. X   XWarpPointer(XtDisplay(toplevel), None, XtWindow(To), 0, 0, 0, 0, 10, 5);
  1206. X  } /* sendMail */
  1207. X--- 291,308 ----
  1208. X   Normalize(Cclist);
  1209. X   Normalize(Bcc);
  1210. X  
  1211. X   XtPopup(Popup, XtGrabNone);
  1212. X  
  1213. X   XWarpPointer(XtDisplay(toplevel), None, XtWindow(To), 0, 0, 0, 0, 10, 5);
  1214. X  } /* sendMail */
  1215. X+ 
  1216. X+ 
  1217. X+ /*
  1218. X+ ** @(#)writeMail() - Write s to mail, and flush the output.
  1219. X+ */
  1220. X+ void
  1221. X+ writeMail(s) 
  1222. X+ char *s;
  1223. X+ {
  1224. X+  write(mail_fd, s, strlen(s));
  1225. X+ } /* writeMail */
  1226. X*** ../v1.1/make.file    Mon Jun  4 09:48:40 1990
  1227. X--- make.file    Mon Aug 27 11:09:20 1990
  1228. X***************
  1229. X*** 41,46 ****
  1230. X--- 41,47 ----
  1231. X          actions.c \
  1232. X          callMail.c \
  1233. X          callbacks.c \
  1234. X+         confirm.c \
  1235. X          directory.c \
  1236. X          environs.c \
  1237. X          handler.c \
  1238. X***************
  1239. X*** 56,61 ****
  1240. X--- 57,63 ----
  1241. X          actions.o \
  1242. X          callMail.o \
  1243. X          callbacks.o \
  1244. X+         confirm.o \
  1245. X          directory.o \
  1246. X          environs.o \
  1247. X          handler.o \
  1248. X***************
  1249. X*** 92,100 ****
  1250. X  # ########### DEPENDENCIES GO HERE ########################
  1251. X  #
  1252. X  HelpText.o:    defs.h global.h
  1253. X! actions.o:    defs.h global.h
  1254. X  callMail.o:    defs.h global.h
  1255. X! callbacks.o:    defs.h global.h
  1256. X  directory.o:    defs.h global.h
  1257. X  environs.o:    defs.h global.h
  1258. X  handler.o:    defs.h global.h xmailregex.h
  1259. X--- 94,102 ----
  1260. X  # ########### DEPENDENCIES GO HERE ########################
  1261. X  #
  1262. X  HelpText.o:    defs.h global.h
  1263. X! actions.o:    defs.h global.h xmailregex.h
  1264. X  callMail.o:    defs.h global.h
  1265. X! callbacks.o:    defs.h global.h xmailregex.h
  1266. X  directory.o:    defs.h global.h
  1267. X  environs.o:    defs.h global.h
  1268. X  handler.o:    defs.h global.h xmailregex.h
  1269. X*** ../v1.1/parser.c    Mon Jun  4 09:48:40 1990
  1270. X--- parser.c    Mon Aug 27 11:09:21 1990
  1271. X***************
  1272. X*** 32,38 ****
  1273. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  1274. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  1275. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  1276. X!  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1277. X   * PERFORMANCE OF THIS SOFTWARE.
  1278. X   *
  1279. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  1280. X--- 32,38 ----
  1281. X   * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  1282. X   * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  1283. X   * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  1284. X!  * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1285. X   * PERFORMANCE OF THIS SOFTWARE.
  1286. X   *
  1287. X   * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  1288. X***************
  1289. X*** 39,44 ****
  1290. X--- 39,45 ----
  1291. X   *
  1292. X   */
  1293. X  
  1294. X+ #define    PARSER
  1295. X  
  1296. X  #include    "global.h"
  1297. X  #include    "regex.h"
  1298. X***************
  1299. X*** 80,86 ****
  1300. X  ** @(#)match() - string against regular expressions in pattern table.
  1301. X  ** The best match is found, and function returns index to the pattern table.
  1302. X  */
  1303. X! static int
  1304. X  match(patternTable, string)
  1305. X  PatternRec     *patternTable;
  1306. X  char     *string;
  1307. X--- 81,87 ----
  1308. X  ** @(#)match() - string against regular expressions in pattern table.
  1309. X  ** The best match is found, and function returns index to the pattern table.
  1310. X  */
  1311. X! int
  1312. X  match(patternTable, string)
  1313. X  PatternRec     *patternTable;
  1314. X  char     *string;
  1315. X***************
  1316. X*** 123,129 ****
  1317. X   XtTextBlock    textblock;
  1318. X   XtTextPosition    pos;
  1319. X   Widget        button, icon, popup, iw;
  1320. X!  char        tmp[128], *c, *index();
  1321. X   int        num;
  1322. X   static    Boolean    first_time = True;
  1323. X   static    String    old_msg = NULL;
  1324. X--- 124,130 ----
  1325. X   XtTextBlock    textblock;
  1326. X   XtTextPosition    pos;
  1327. X   Widget        button, icon, popup, iw;
  1328. X!  char        tmp[128], *c;
  1329. X   int        num;
  1330. X   static    Boolean    first_time = True;
  1331. X   static    String    old_msg = NULL;
  1332. X***************
  1333. X*** 159,166 ****
  1334. X                         if (c = GetMailrc("nohold")) XtFree(c);
  1335. X                         else strcat(tmp, "hold ");
  1336. X  
  1337. X!                        strcat(tmp, "nocrt noreplyall");
  1338. X  
  1339. X                         c = QueryMail(tmp);
  1340. X                         XtFree(c);
  1341. X  
  1342. X--- 160,170 ----
  1343. X                         if (c = GetMailrc("nohold")) XtFree(c);
  1344. X                         else strcat(tmp, "hold ");
  1345. X  
  1346. X!                        c = QueryMail(tmp);
  1347. X!                        XtFree(c);
  1348. X  
  1349. X+                        strcpy(tmp, "unset crt replyall");
  1350. X+ 
  1351. X                         c = QueryMail(tmp);
  1352. X                         XtFree(c);
  1353. X  
  1354. X***************
  1355. X*** 176,182 ****
  1356. X                               sprintf(tmp, "%d", msgnum);
  1357. X                               XtFree(msg);
  1358. X                               msg = QueryMail(tmp);
  1359. X!                              markIndex(" ");
  1360. X                              }
  1361. X                           }
  1362. X                        }
  1363. X--- 180,186 ----
  1364. X                               sprintf(tmp, "%d", msgnum);
  1365. X                               XtFree(msg);
  1366. X                               msg = QueryMail(tmp);
  1367. X!                              markIndex("> ");
  1368. X                              }
  1369. X                           }
  1370. X                        }
  1371. X***************
  1372. X*** 186,191 ****
  1373. X--- 190,196 ----
  1374. X                                           icon_handler, NULL);
  1375. X                         first_time = False;
  1376. X                        }
  1377. X+                     strcpy(Command, "");
  1378. X                  break;
  1379. X  /*
  1380. X  ** In response to normal or change folder commands, test output.  If an
  1381. X***************
  1382. X*** 201,206 ****
  1383. X--- 206,215 ----
  1384. X              switch (j) {
  1385. X                 case O_BELL  : Bell(msg);
  1386. X                                        XtFree(msg);
  1387. X+                                       pos = XtTextGetInsertionPoint(WidgetOf(
  1388. X+                                                  WidgetOf(toplevel,"topBox"),
  1389. X+                                                  "indexWindow")) + 1;
  1390. X+                                       msgnum = PositionToMsgNumber(pos);
  1391. X                                        msg = QueryMail("file");
  1392. X                                        if (strncmp(&msg[1], tmpName, strlen(tmpName)) == 0) {
  1393. X                                   UpdateTitleBar("No current folder");
  1394. X***************
  1395. X*** 207,218 ****
  1396. X                                           iw = WidgetOf(toplevel, "topBox");
  1397. X                                           writeText(WidgetOf(iw, "indexWindow"), " ", FALSE);
  1398. X                                           writeTo(WidgetOf(iw, "textWindow"), " ");
  1399. X                                          }
  1400. X                                        XtFree(msg);
  1401. X                                        *msg='\0';
  1402. X                                        break;
  1403. X                 case O_EXEC  : msgnum = index_handler(0, 0);
  1404. X!                                       markIndex(" ");
  1405. X                                        break;
  1406. X                 case O_FILE  : msgnum = file_handler(1);
  1407. X                                c = index(msg, '\n');
  1408. X--- 216,231 ----
  1409. X                                           iw = WidgetOf(toplevel, "topBox");
  1410. X                                           writeText(WidgetOf(iw, "indexWindow"), " ", FALSE);
  1411. X                                           writeTo(WidgetOf(iw, "textWindow"), " ");
  1412. X+                                         } else {
  1413. X+                                          XtFree(msg);
  1414. X+                                          sprintf(tmp, "f %d", msgnum);
  1415. X+                                          msg = QueryMail(tmp);
  1416. X                                          }
  1417. X                                        XtFree(msg);
  1418. X                                        *msg='\0';
  1419. X                                        break;
  1420. X                 case O_EXEC  : msgnum = index_handler(0, 0);
  1421. X!                                       markIndex("> ");
  1422. X                                        break;
  1423. X                 case O_FILE  : msgnum = file_handler(1);
  1424. X                                c = index(msg, '\n');
  1425. X***************
  1426. X*** 233,239 ****
  1427. X                                              sprintf(tmp, "%d", msgnum);
  1428. X                                              XtFree(msg);
  1429. X                                              msg = QueryMail(tmp);
  1430. END_OF_FILE
  1431. if test 53806 -ne `wc -c <'Patch.02c'`; then
  1432.     echo shar: \"'Patch.02c'\" unpacked with wrong size!
  1433. fi
  1434. # end of 'Patch.02c'
  1435. fi
  1436. echo shar: End of archive 5 \(of 5\).
  1437. cp /dev/null ark5isdone
  1438. MISSING=""
  1439. for I in 1 2 3 4 5 ; do
  1440.     if test ! -f ark${I}isdone ; then
  1441.     MISSING="${MISSING} ${I}"
  1442.     fi
  1443. done
  1444. if test "${MISSING}" = "" ; then
  1445.     echo You have unpacked all 5 archives.
  1446.     echo Now ...
  1447.     echo "concatenate these five Patch.02? files (in order) into one file ..."
  1448.     echo "and apply to a set of xmail 1.1 sources, using the 'patch' program."
  1449.     rm -f ark[1-9]isdone
  1450. else
  1451.     echo You still need to unpack the following archives:
  1452.     echo "        " ${MISSING}
  1453. fi
  1454. ##  End of shell archive.
  1455. exit 0
  1456.  
  1457. dan
  1458. ----------------------------------------------------
  1459. O'Reilly && Associates   argv@sun.com / argv@ora.com
  1460. Opinions expressed reflect those of the author only.
  1461.